package com.softserve.academy.food.dao;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class Dao 
{
	@Autowired
	protected SessionFactory sessionFactory;
	
	public void Update( Object object )  
	{
		sessionFactory.getCurrentSession().update( object );
	}

	public void Delete(Object object)  
	{
		sessionFactory.getCurrentSession().delete( object );
	}
	
}
